<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>产生一个查询字符串</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.http-throttle.html">http_throttle</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.http-build-url.html">http_build_url</a></div>
 <div class="up"><a href="ref.http.html">HTTP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.http-build-str" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">http_build_str</h1>
  <p class="verinfo">(PECL pecl_http &gt;= 0.23.0)</p><p class="refpurpose"><span class="refname">http_build_str</span> &mdash; <span class="dc-title">产生一个查询字符串</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.http-build-str-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>http_build_str</strong></span>
    ( <span class="methodparam"><span class="type">array</span> <code class="parameter">$query</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$prefix</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$arg_separator</code><span class="initializer"> = ini_get(&quot;arg_separator.output&quot;)</span></span>
  ]] )</div>

  <p class="para rdfs-comment">
   和 parse_str() 相反。
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.http-build-str-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">query</code></em></dt>

     <dd>

      <p class="para">
       查询字符串参数的关联数组。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">prefix</code></em></dt>

     <dd>

      <p class="para">
       顶层前缀。
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">arg_separator</code></em></dt>

     <dd>

      <p class="para">
       使用的参数分隔符号（默认使用 INI 设置中的 arg_separator.output，如果都没设置则使用 &quot;&amp;&quot;）。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.http-build-str-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回产生的查询字符串， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 


 


 


 <div class="refsect1 seealso" id="refsect1-function.http-build-str-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member">standard <span class="function"><a href="function.http-build-query.html" class="function" rel="rdfs-seeAlso">http_build_query()</a> - 生成 URL-encode 之后的请求字符串</span></li>
    <li class="member"><span class="function"><a href="function.http-build-url.html" class="function" rel="rdfs-seeAlso">http_build_url()</a> - 产生一个 URL</span></li>
   </ul>
  </p>
 </div>



</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.http-throttle.html">http_throttle</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.http-build-url.html">http_build_url</a></div>
 <div class="up"><a href="ref.http.html">HTTP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
